package com.example.demo.service.impl;

import com.example.demo.entity.User;
import com.example.demo.mapper.UserMapper;
import com.example.demo.service.IUserService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.autoconfigure.AutoConfigureOrder;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author Fyly
 * @since 2019-03-30
 */
@Service("userService")
@Transactional
public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IUserService {

    @Autowired
   IUserService userService;

    @Override
    public boolean save(User user) {
        boolean a = userService.save(user);
        return a;
    }

    @Override
    public User getById(Integer id) {
        User user = userService.getById(id);
        return user;
    }

    @Override
    public boolean removeById(Integer id) {
        return userService.removeById(id);
    }
}
